<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo1"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<body>

<div class="layui-card">

    <div class="layui-card-header">
        <span class="layui-icon font-s10 color-desc margin-right-5"></span>合同模板管理
        <div class="pull-right">
<!--            <button data-table-id="NoticeTable" class="layui-btn layui-btn-primary  layui-btn-sm" data-modal="/system/user/form" data-height="720px" data-width="800px">-->
<!--                <i class=" layui-icon layui-icon-addition"></i>新建护工</button>-->
        </div>
    </div>

    <div class="layui-card-line"></div>

    <div class="layui-card-body">

        <div class="layui-card-table layui-tab">
            <div class="layui-tab-content">
                <form th:replace="/pcs/contract_tpl/index_search">

                </form>
                <table id="contractTplTable"  data-url='/pcs/contractTpl/index' data-target-search="form.form-search"></table>
                <script type="text/javascript" th:inline="none">
                    $(function () {
                        $('#contractTplTable').layTable({
                            even: true, height: 'full',
                            cols: [[
                                {title: '序号', type: 'numbers', width: 60},
                                {field: 'sn', title: '合同编号', minWidth: 300, align: 'center'},
                                {field: 'title', title: '合同名称', minWidth: 200, align: 'center'},
                                {field: 'companyName', title: '陪护公司', minWidth: 100, align: 'center'},
                                {field: 'createTime', title: '创建时间', minWidth: 100, align: 'center'},
                                {toolbar: '#toolbarc', title: '操作', align: 'center', minWidth: 280, fixed: 'right'}
                            ]]
                        });
                    });



                </script>


                <script type="text/html" id="toolbarc">
                    <a class="layui-btn layui-btn-sm" data-event-dbclick data-title="编辑" shiro:hasPermission="pcs:contractTpl:add"   data-modal='/pcs/contractTpl/form?id={{d.id}}'>编 辑</a>
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-event-dbclick data-confirm="确定要删除吗?" shiro:hasPermission="pcs:contractTpl:state" data-action='/pcs/contractTpl/state?id={{d.id}}&status=3'>删除</a>
                    {{# if(d.verifyStatus == 0){}}
                    <a class="layui-btn layui-btn-sm layui-bg-green" data-event-dbclick data-confirm="确定要通过吗?"  shiro:hasPermission="pcs:contractTpl:verify" data-action='/pcs/contractTpl/verify?ids={{d.id}}&verifyStatus=1'>通过</a>
                    <a class="layui-btn layui-btn-sm layui-bg-orange" data-event-dbclick  shiro:hasPermission="pcs:contractTpl:verify" data-modal='/pcs/contractTpl/canal?id={{d.id}}&verifyStatus=2'>驳回</a>
                    {{# }else if(d.verifyStatus == 1){}}
                    <a class="layui-btn layui-btn-sm layui-bg-green"   shiro:hasPermission="pcs:contractTpl:verify" >已通过</a>
                    {{# }else if(d.verifyStatus == 2){}}
                    <a class="layui-btn layui-btn-sm layui-bg-orange" data-event-dbclick   shiro:hasPermission="pcs:contractTpl:verify" >已驳回</a>
                    {{# } }}
                </script>

            </div>
        </div>
    </div>

</div>
</body>
</html>